// 导入自定义节点组件
import StartNode from './nodes/StartNode.vue';
import ConditionNode from './nodes/ConditionNode.vue';
import LoopNode from './nodes/LoopNode.vue';
import ActionNode from './nodes/ActionNode.vue';
import EndNode from './nodes/EndNode.vue';
import InitiatorNode from './nodes/InitiatorNode.vue';
import ApproverNode from './nodes/ApproverNode.vue';

// 导出节点类型映射
export const nodeTypes = {
  start: StartNode,
  condition: ConditionNode,
  loop: LoopNode,
  action: ActionNode,
  end: EndNode,
  initiator: InitiatorNode,
  approver: ApproverNode
};

// 导出节点配置信息，用于工具栏
export const nodeConfig = [
  {
    type: 'start',
    label: '开始节点',
    description: '流程的起点',
    color: '#4CAF50'
  },
  {
    type: 'initiator',
    label: '发起人',
    description: '流程的发起人',
    color: '#2196F3'
  },
  {
    type: 'approver',
    label: '审批人',
    description: '流程的审批人',
    color: '#FF9800'
  },
  {
    type: 'condition',
    label: '条件节点',
    description: '根据条件选择不同的执行路径',
    color: '#FFC107'
  },
  {
    type: 'loop',
    label: '循环节点',
    description: '重复执行一段代码',
    color: '#2196F3'
  },
  {
    type: 'action',
    label: '动作节点',
    description: '执行一段JavaScript代码',
    color: '#9C27B0'
  },
  {
    type: 'end',
    label: '结束节点',
    description: '流程的终点',
    color: '#F44336'
  }
];